.class public final Lnet/tsapps/topdeals/a/j;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:Lnet/tsapps/topdeals/e/a;

.field private b:Landroid/view/LayoutInflater;

.field private c:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lnet/tsapps/topdeals/e/a;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-object p2, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    iput-object p1, p0, Lnet/tsapps/topdeals/a/j;->c:Landroid/content/Context;

    const-string v0, "layout_inflater"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    iput-object v0, p0, Lnet/tsapps/topdeals/a/j;->b:Landroid/view/LayoutInflater;

    return-void
.end method


# virtual methods
.method public final a()Ljava/lang/String;
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    iget-wide v0, v0, Lnet/tsapps/topdeals/e/a;->b:J

    invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public final a(I)V
    .locals 3

    iget-object v0, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    invoke-virtual {p0, p1}, Lnet/tsapps/topdeals/a/j;->getItemId(I)J

    move-result-wide v1

    iput-wide v1, v0, Lnet/tsapps/topdeals/e/a;->b:J

    return-void
.end method

.method public final a(J)V
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    iput-wide p1, v0, Lnet/tsapps/topdeals/e/a;->b:J

    invoke-super {p0}, Landroid/widget/BaseAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method public final getCount()I
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    iget-object v0, v0, Lnet/tsapps/topdeals/e/a;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public final getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    iget-object v0, v0, Lnet/tsapps/topdeals/e/a;->a:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public final getItemId(I)J
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    iget-object v0, v0, Lnet/tsapps/topdeals/e/a;->a:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v0

    return-wide v0
.end method

.method public final getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 7

    iget-object v0, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    iget-object v0, v0, Lnet/tsapps/topdeals/e/a;->a:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    if-nez p2, :cond_0

    iget-object v1, p0, Lnet/tsapps/topdeals/a/j;->b:Landroid/view/LayoutInflater;

    const v2, 0x7f030010

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    :cond_0
    const v1, 0x7f05002e

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    const v2, 0x7f05002f

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iget-object v3, p0, Lnet/tsapps/topdeals/a/j;->c:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "interval_"

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    const-string v5, "string"

    iget-object v6, p0, Lnet/tsapps/topdeals/a/j;->c:Landroid/content/Context;

    invoke-virtual {v6}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v3

    iget-object v4, p0, Lnet/tsapps/topdeals/a/j;->c:Landroid/content/Context;

    invoke-virtual {v4, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v1, p0, Lnet/tsapps/topdeals/a/j;->a:Lnet/tsapps/topdeals/e/a;

    iget-wide v3, v1, Lnet/tsapps/topdeals/e/a;->b:J

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v0

    cmp-long v0, v3, v0

    if-nez v0, :cond_1

    const v0, 0x7f02002d

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    :goto_0
    return-object p2

    :cond_1
    const v0, 0x7f02002c

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_0
.end method

.method public final notifyDataSetChanged()V
    .locals 0

    invoke-super {p0}, Landroid/widget/BaseAdapter;->notifyDataSetChanged()V

    return-void
.end method
